package com.zzc.controller;

import com.zzc.entity.User;
import com.zzc.mapper.UserMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "用户")
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/info")
    @ApiOperation(value = "查询", notes = "查询")
    public List<User> index() {
        List<User> users = userMapper.selectList(null);
        return users;
    }

}
